﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DiscoveryLogic.DataViz.NetworkDiagram.NetworkData
{
    /// <summary>
    /// 
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class NetworkDataClassAttribute:Attribute
    {
        private string _PkField;
        /// <summary></summary>
        public string PkField
        {
            get
            {
                return this._PkField;
            }
            set
            {
                this._PkField = value;
            }
        }

		private string _LabelField;
		/// <summary>
		/// it's value is used to label node in the graph, must be string type or 
		/// can get from GetString() method
		/// usually the same as PK value</summary>
		public string LabelField
		{
			get
			{
				return this._LabelField;
			}
			set
			{
				this._LabelField = value;
			}
		}

        private string _LinkFromField;
        /// <summary></summary>
        public string LinkFromField
        {
            get
            {
                return this._LinkFromField;
            }
            set
            {
                this._LinkFromField = value;
            }
        }

        private string _LinkToField;
        /// <summary></summary>
        public string LinkToField
        {
            get
            {
                return this._LinkToField;
            }
            set
            {
                this._LinkToField = value;
            }
        }

        private LinkMethod _LinkMethod;
        /// <summary></summary>
        public LinkMethod LinkMethod
        {
            get
            {
                return this._LinkMethod;
            }
            set
            {
                this._LinkMethod = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="pkField"></param>
        /// <param name="labelField"></param>
        /// <param name="fromMember"></param>
        /// <param name="toMember"></param>
        /// <param name="method"></param>
        public NetworkDataClassAttribute(string pkField, string labelField,
            string fromMember, string toMember, LinkMethod method)
        {
            this._PkField = pkField;
        	this._LabelField = labelField;
            this._LinkFromField = fromMember;
            this._LinkToField = toMember;
            this._LinkMethod = method;
        }
    }
}
